package com.xnyzc.lhy.resource.feign.coupon;

import com.xnyzc.lhy.common.entity.CouponRv;
import com.xnyzc.lhy.mis.entity.coupon.CouponBatchPublishParam;
import com.xnyzc.lhy.mis.entity.coupon.CouponPublishParam;
import com.xnyzc.lhy.resource.feign.fallback.coupon.CouponServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * <p>
 * 优惠券处理 服务类
 * </p>
 *
 * @author haoyfa
 * @since 2019-12-16
 */
@FeignClient(name = "${feign.applicationName.mis}", fallback = CouponServiceFallback.class)
public interface ICouponService {
    /**
     * 有效优惠券查询
     *
     * @return
     */
    @GetMapping(value = "/coupon/couponBatch/queryEffectiveCouponList")
    CouponRv queryEffectiveCouponList();

    /**
     * 发放优惠券
     *
     * @return
     */
    @PostMapping(value = "/coupon/couponBatch/publishCoupon")
    CouponRv publishCoupon(@RequestBody CouponPublishParam couponPublishParam);

    /**
     * 批量发放优惠券
     *
     * @return
     */
    @PostMapping(value = "/coupon/couponBatch/batchPublishCoupon")
    CouponRv batchPublishCoupon(CouponBatchPublishParam couponBatchPublishParam);
}
